<template>
  <el-card class="doctor-card">
    <el-image :src="docInfo.doctorPhoto" fit="cover" class="image"></el-image>
    <div style="padding: 10px;" class="info-container">
      <span>{{docInfo.doctorName}}</span><br>
      <span style="font-size: 1%;color: #8e8e8e">{{ docInfo.doctorDepartment }}</span>
      <span style="font-size: 1%;color: #8e8e8e">{{docInfo.doctorTitle}}</span>
      <div class="bottom clearfix">
        <span ><el-button type="primary" icon="el-icon-thumb" size="mini" round @click="goDocInfo">查看</el-button></span>
<!--        class="bottom-left"<span class="bottom-right"><el-button type="danger" icon="el-icon-delete" size="mini" round>删除</el-button></span>-->
      </div>
    </div>
  </el-card>
</template>

<script>
export default {
  name: "DoctorCard",
  props:["docInfo"],
  // methods:{
  //   goPersonalInfo(){
  //     this.$router.push({path:'/admin/DoctorInfo'})
  //     }
  //   }
  methods:{
    goDocInfo(){
      const str = this.$route.path.split('/')[1]
      //指定跳转地址
      this.$router.push({name:`/${str}doctorInfo`,params: {DocId: this.docInfo.id}})
    }
  }
}
</script>
